<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/config.inc.php');
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/top.inc.php');

$section_id = $_GET['sec_id'];
$csm_id = $_GET['csm_id'];
$course_id = $_GET['cid'];
$subject_id = $_GET['sid'];
$cl_csm_id = $_GET['id'];

$get_subject_data = mysql_query("SELECT * FROM course_subjects WHERE id = $subject_id");
$subject_name = mysql_result($get_subject_data,0,'subject_title');
$abbreviation = mysql_result($get_subject_data,0,'abbreviation');

$get_course_data = mysql_query("SELECT * FROM courses WHERE id = $course_id");
$course_number = mysql_result($get_course_data,0,'course_number');
$course_name = mysql_result($get_course_data,0,'title');

$get_section_data = mysql_query("SELECT * FROM course_sections WHERE id = $section_id");
$section_number = mysql_result($get_section_data,0,'section_number');

$formatted_section_number = sprintf("%03d", $section_number);

echo "<h1>Delete Crosslisting for $abbreviation $course_number - $formatted_section_number</h1>";

//close
mysql_close();

echo "<p>";
echo "Are you sure you want to delete crosslisting for <b>$abbreviation $course_number - $formatted_section_number</b>?";

echo "<form method='post' action='delete_do.php'>";
	echo "<input type='hidden' name='cid' value='$course_id'>";
	echo "<input type='hidden' name='sid' value='$subject_id'>";
	echo "<input type='hidden' name='csm_id' value='$csm_id'>";
	echo "<input type='hidden' name='sec_id' value='$section_id'>";
	echo "<input type='hidden' name='id' value='$cl_csm_id'>";
	echo "<input type='Submit' value='Yes'>";
echo "</form>";

echo "</p>";

echo "<p>";
	echo "<a href='index.php?sid=$subject_id&csm_id=$csm_id&cid=$course_id&sec_id=$section_id'>&lt;&lt; Back to Section Crosslisting Portal</a><br />";
echo "</p>";
?>
<?php
	require_once($_SERVER['DOCUMENT_ROOT'].'uno-course-scheduler/include/bottom.inc.php');
?>